package objects;

import java.util.Iterator;

import common.LoadingData;

public class SubArea
{

	private long guid, areaGuid;
	private short alignment;
	
	public SubArea()
	{
		
	}
	
	public SubArea(long pGuid, long pAreaGuid, short pAlignment)
	{
		guid = pGuid;
		areaGuid = pAreaGuid;
		alignment = pAlignment;
	}

	public long getGuid() {
		return guid;
	}

	public void setGuid(long guid) {
		this.guid = guid;
	}

	public long getAreaGuid() {
		return areaGuid;
	}

	public void setAreaGuid(long pAreaGuid) {
		this.areaGuid = pAreaGuid;
	}
	
	public short getAlignment()
	{
		return alignment;
	}
	
	public void setAlignment(short pAlignment)
	{
		this.alignment = pAlignment;		
	}
	
	public static String formatALSubArea()
	{
		String formatedSB = "al";
		
		Iterator<SubArea> vIter = LoadingData.getSubAreaData().values().iterator();
		
		while(vIter.hasNext())
		{
			SubArea subArea = vIter.next();
			
			formatedSB += "|" + subArea.getGuid() + ";" + subArea.getAlignment();
		}
		
		return formatedSB;
	}
	
}